﻿using System;
using OutlookContactsSync.Domain.Properties;
using OutlookContactsSync.Domain.Views;

namespace OutlookContactsSync
{
    public partial class StatusForm : BaseForm, IOutlookSyncStatusView   
    {
        public StatusForm()
        {
            InitializeComponent();
            Text = Resources.StatusFormTitle;
        }

        #region IOutlookSyncStatusView Members

        public string AmountOfUsersSynced
        {
            set
            {
                labelNewUsersLabel.Text = value;
            }
        }

        public string AmountOfUsersUpdated
        {
            set
            {
                labelUsersUpdated.Text = value;
            }
        }

        public string AmountOfUsersRemoved
        {
            set
            {
                labelUsersRemoved.Text = value;
            }
        }

        public string LastSuccesFullSyncDate
        {
            set
            {
                LastSuccesfullSynclabel.Text = value;
            }
        }

        public string LastSuccesfullSyncDuration
        {
            set
            {
                DurationOfLastSynclabel.Text = value;
            }
        }

        public override void ShowForm()
        {
            ShowDialog();
        }

        #endregion

        private void OkButton_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void CancelButton_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}